﻿<UserControl x:Class="BillsManager.Views.SearchSuppliersView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:ViewModel="clr-namespace:BillsManager.ViewModels;assembly=BillsManager.ViewModels"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:Loc="clr-namespace:BillsManager.Localization;assembly=BillsManager.Localization"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             d:DataContext="{d:DesignInstance Type=ViewModel:SearchSuppliersViewModel,
                                              IsDesignTimeCreatable=True}"
             mc:Ignorable="d">

    <UserControl.Resources>
        <!--<ResourceDictionary Source="/BillsManager.Views;component/Dictionaries/Styles.xaml" />-->
        <ResourceDictionary Source="/BillsManager.Views;component/Themes\Themes.xaml" />
    </UserControl.Resources>

    <UserControl.Background>
        <Binding Mode="OneTime" Source="{StaticResource View.Background}" />
    </UserControl.Background>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="{StaticResource View.MarginSize}" />
            <RowDefinition Height="Auto" />
            <!--<RowDefinition Height="Auto" />-->
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="{StaticResource View.MarginSize}" />
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="{StaticResource View.MarginSize}" />
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>

        <!--<Rectangle Grid.ColumnSpan="6"
                   Height="{StaticResource Separator.Size}"
                   Margin="0 1"
                   Fill="{StaticResource View.Foreground.Disabled}" />-->

        <TextBlock Grid.Row="1"
                   Margin="0 2"
                   Foreground="{StaticResource View.Title.Foreground}"
                   Text="{Loc:Translate Obligation}" />

        <StackPanel Grid.Row="3"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Center"
                    Orientation="Horizontal">
            <CheckBox HorizontalAlignment="Left"
                      VerticalAlignment="Center"
                      IsChecked="{Binding UseObligationStateFilter}" />
            <ComboBox Grid.Row="1"
                      Grid.Column="2"
                      Width="Auto"
                      MinWidth="100"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Center"
                      ItemsSource="{Binding ObligationStates,
                                            Mode=OneTime}"
                      SelectedValue="{Binding ObligationStateFilterValue}" />
        </StackPanel>

        <Button Grid.Row="3"
                Grid.Column="2"
                HorizontalAlignment="Left"
                VerticalAlignment="Center"
                Command="{Binding SendFilterCommand}"
                Content="{Loc:Translate DoFilter}"
                Focusable="False" />

        <Button Grid.Row="3"
                Grid.Column="4"
                HorizontalAlignment="Left"
                VerticalAlignment="Center"
                Command="{Binding ExitSearchCommand}"
                Content="{Loc:Translate ShowAll}"
                Focusable="False" />

        <!--<Rectangle Grid.Row="4"
                   Grid.ColumnSpan="6"
                   Height="{StaticResource Separator.Size}"
                   Margin="0 1"
                   Fill="{StaticResource View.Foreground.Disabled}" />-->
    </Grid>
</UserControl>
